using System;
using System.Collections.Generic;
using System.Text;
using NBusiness.Query;

namespace NBusiness.MySql.Query
{
    public class MySqlIn : MySqlBoolean
    {
        public bool Not
        {
            get { return Operator == MySqlBooleanOperator.NotIn; }
            set { Operator = (value ? MySqlBooleanOperator.NotIn : MySqlBooleanOperator.In); }
        }

        public MySqlIn() 
            : base(null, MySqlBooleanOperator.In, null)
        { }

        public MySqlIn(IEvaluatable left, IEvaluatable right)
            : this(left, right, false)
        { }

        public MySqlIn(IEvaluatable left, IEvaluatable right, bool not)
            : base(left, (not ? MySqlBooleanOperator.NotIn : MySqlBooleanOperator.In), right)
        { }
    }
}
